package com.king.controller;

import com.king.annotations.IAutowired;
import com.king.annotations.IController;
import com.king.annotations.IRequestMapping;
import com.king.annotations.ISecurity;
import com.king.service.DemoService;

/**
 * @ClassName: IController
 * @Description: TODO
 * @Author: wangchangyong
 * @Date: 2020/4/12 11:30
 * @Version: 1.0.0
 **/
@IController
@IRequestMapping(value = "/demo")
@ISecurity(value = {"k01","k02"})
public class DemoController {

    @IAutowired
    private DemoService demoService;

    @IRequestMapping("/test1")
    public String demoTest1(String name){
        return demoService.get(name);
    }

    @IRequestMapping("/test2")
    @ISecurity(value = {"k03"})
    public String demoTest2(String name){
        return demoService.get(name);
    }

}
